home *** CD-ROM | disk | FTP | other *** search
- <xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
- xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
- xmlns:xhtml='http://www.w3.org/1999/xhtml'
- xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- exclude-result-prefixes='content slash dc'>
-
- <xsl:output method='xml' indent='yes' />
-
-
- <!-- channel group newspaper -->
- <xsl:template match="newspaper[@type='group']">
- <html>
- <head>
- <title><xsl:value-of select='title'/></title>
- <!-- <base href="{//channel/link}" /> -->
- <style><![CDATA[
- body {
- background: #FF6600;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Arial, Helvetica, sans-serif;
- Arial;
- color:#FF6600;
- cell-padding:2pt;
- background:#000000;
- padding: 5px;
- margin-top: 5px;
- }
-
- .title {
- font-size:14pt;
- font-weight: bold;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date {
- font-size:9pt;
- font-weight: bold;
- }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:0pt 10pt 10pt;
- padding:5pt;
- background-color: #FF6600; }
-
- a:link { color:#000000;text-decoration:none;font-weight:bold; }
- a:visited { color:#000000;text-decoration:none;font-weight: bold;}
- a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- td.channel a:link { color:#FF6600;text-decoration:none;font-weight:bold; }
- td.channel a:visited { color:#FF6600;text-decoration:none;font-weight: bold;}
- td.channel a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- .dings {
- font-family: Webdings;
- font-size: 36pt;
- }
- .channel { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
- ]]></style>
- </head>
- <body>
- <xsl:for-each select='//channel'>
- <xsl:variable name='channeltitle'><xsl:value-of select='current()/title' /></xsl:variable>
- <xsl:variable name='channellink'><xsl:value-of select='current()/link' /></xsl:variable>
- <xsl:variable name='channeldesc'><xsl:value-of select='current()/description' /></xsl:variable>
- <xsl:for-each select='current()//item'>
- <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
- <tr>
- <td width="30" rowspan="2" valign="top"><span class="dings">"</span></td>
- <td colspan="2" valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span></td>
- </tr>
- <tr>
- <td valign="top" class="date"><xsl:value-of select='current()/pubDate'/></td>
- <td align="right" valign="top" class="channel"><a href='{$channellink}' title='{$channeldesc}'><xsl:value-of disable-output-escaping='yes' select='$channeltitle'/></a></td>
- </tr>
- </table>
- <div class='content'>
- <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{current()/link}'>Read on...</a> <xsl:if test='current()/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </xsl:for-each>
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
- <!-- channel newspaper -->
- <xsl:template match="newspaper[@type='channel']">
- <html>
- <head>
- <title><xsl:value-of select='//channel/title'/></title>
- <base href="{//channel/link}" />
- <style><![CDATA[
- body {
- background: #FF6600;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Arial, Helvetica, sans-serif;
- Arial;
- color:#FF6600;
- cell-padding:2pt;
- background:#000000;
- padding: 5px;
- margin-top: 5px;
- }
-
- .title {
- font-size:14pt;
- font-weight: bold;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date {
- font-size:9pt;
- font-weight: bold;
- }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:0pt 10pt 10pt;
- padding:5pt;
- background-color: #FF6600; }
-
- a:link { color:#000000;text-decoration:none;font-weight:bold; }
- a:visited { color:#000000;text-decoration:none;font-weight: bold;}
- a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- td.channel a:link { color:#FF6600;text-decoration:none;font-weight:bold; }
- td.channel a:visited { color:#FF6600;text-decoration:none;font-weight: bold;}
- td.channel a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- .dings {
- font-family: Webdings;
- font-size: 36pt;
- }
- .channel { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
- ]]></style>
- </head>
- <body>
- <xsl:for-each select='//item'>
- <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
- <tr>
- <td width="30" rowspan="2" valign="top"><span class="dings">"</span></td>
- <td colspan="2" valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span></td>
- </tr>
- <tr>
- <td valign="top" class="date"><xsl:value-of select='current()/pubDate'/></td>
- <td align="right" valign="top" class="channel"><a href='{//channel/link}' title='{//channel/description}'><xsl:value-of disable-output-escaping='yes' select='//channel/title'/></a></td>
- </tr>
- </table>
- <div class='content'>
- <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{current()/link}'>Read on...</a> <xsl:if test='current()/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
- <!-- single news item -->
- <xsl:template match="newspaper[@type='newsitem']">
- <html>
- <head>
- <title><xsl:value-of select='//item/title'/></title>
- <base href="{//item/link}" />
- <style><![CDATA[
- body {
- background: #FF6600;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Arial, Helvetica, sans-serif;
- Arial;
- color:#FF6600;
- cell-padding:2pt;
- background:#000000;
- padding: 5px;
- margin-top: 5px;
- }
-
- .title {
- font-size:14pt;
- font-weight: bold;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date {
- font-size:9pt;
- font-weight: bold;
- }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:0pt 10pt 10pt;
- padding:5pt;
- background-color: #FF6600; }
-
- a:link { color:#000000;text-decoration:none;font-weight:bold; }
- a:visited { color:#000000;text-decoration:none;font-weight: bold;}
- a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- td.channel a:link { color:#FF6600;text-decoration:none;font-weight:bold; }
- td.channel a:visited { color:#FF6600;text-decoration:none;font-weight: bold;}
- td.channel a:hover { color:#FFFFFF;text-decoration:underline;font-weight:bold; }
-
- .dings {
- font-family: Webdings;
- font-size: 36pt;
- }
- .channel { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
- ]]></style>
- </head>
- <body>
- <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
- <tr>
- <td width="30" rowspan="2" valign="top"><span class="dings">"</span></td>
- <td colspan="2" valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='//item/title' /></span></td>
- </tr>
- <tr>
- <td valign="top" class="date"><xsl:value-of select='//item/pubDate'/></td>
- <td align="right" valign="top" class="channel"><a href='{//channel/link}' title='{//channel/description}'><xsl:value-of disable-output-escaping='yes' select='//channel/title'/></a></td>
- </tr>
- </table>
- <div class='content'>
- <xsl:choose> <xsl:when test='//item/xhtml:body'> <xsl:copy-of select='//item/xhtml:body'/>
- </xsl:when> <xsl:when test='//item/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='//item/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{//item/link}'>Read on...</a> <xsl:if test='//item/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </body></html>
- </xsl:template>
- </xsl:stylesheet>